﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using TaoPortal.BusinessLogic.Extensions;
using TaoPortal.BusinessLogic.Repository;
using TaoPortal.Entity;


namespace TaoPortal.Areas.Admin.Models
{
    public class SysLogModel : BaseModel
    {
        public string LogType { get; set; }
        public DateTime? StartTime { get; set; }
        public DateTime? EndTime { get; set; }
        public string Keyword { get; set; }
        public string Sender { get; set; }

        public PagedList<TP_SysLog> GetSysLogList()
        {
            var rp = new SystemRepository();
            var data = rp.GetSysLogList(LogType, Keyword, StartTime, EndTime, Sender, PageIndex, PageSize);
            return data;
        }

        public void Delete(string ids)
        {
            List<string> idList = ids.Split(',').ToList();
            var rp = new SystemRepository();
            rp.DeleteSysLog(idList);
        }

    }
}